class animal:
    def __init__(self,name):
        self.name=name
    def eat(self):
        print('eat')
    def drink(self):
        print('drink')
    def run(self):
        print('run')
    def sleep(self):
        print('sleep')
class Dog(animal):
    def __init__(self,name,color):
        super().__init__(name)#继承父类，如果父亲没有init则跳到爷爷那里
        self.color=color
    def bark(self):
        print('bark')

class xiaotianquan(Dog):
    def __init__(self,name,color,weapon):
        super().__init__(name,color)
        self.weapon=weapon
    def fly(self):
        print('fly')
    def bark(self):
        super().bark()#调用父类
        print("像神一样叫")
if __name__ == '__main__':
    dog=Dog('大黄','黄色')
    print(dog.name)
print("-"*100)
import sys
#argv是一个列表
print(sys.argv)
def use_argv():
    '''
    根据传递的参数不同打开不同文件并打印
    :return:
    '''
    file=open(sys.argv[1],'r',encoding='utf-8')
    print(file.read())
    file.close()

if __name__=='__main__':
    use_argv()